function init (config) {
  return {
    getPlayers(send) {
      const url = `${config.agentSystem}${send.areaCode}`;
      const queryObj = {
        source: {
          lftid: send.lftid,
          offset: send.offset || 0,
          limit: send.limit || 15
        },
        token: send.token,
        type: 5504
      }
      console.log('queryObj', JSON.stringify(queryObj));
      return fetch(url, {
        method: 'POST',
        body: JSON.stringify(queryObj)
      });
    }
  }
}

export default init